projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
806759d
)
loaddefs-gen.el: Generate an autoload for `pcase-defmacro`
author
Stefan Monnier
<monnier@iro.umontreal.ca>
Mon, 12 Feb 2024 03:19:49 +0000
(22:19 -0500)
committer
Stefan Monnier
<monnier@iro.umontreal.ca>
Mon, 12 Feb 2024 03:19:49 +0000
(22:19 -0500)
Autoload cookies on uses of `pcase-defmacro` used to copy
the definition wholesale instead of generating the expected autoload.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Look inside `eval-and-compile` as well.
lisp/emacs-lisp/loaddefs-gen.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/loaddefs-gen.el
b/lisp/emacs-lisp/loaddefs-gen.el
index 1e91e84157d406c577c4b26b23c768f06940b99a..238ec9d179bc654c4b8fe762f7b88f0bc230cb4e 100644
(file)
--- a/
lisp/emacs-lisp/loaddefs-gen.el
+++ b/
lisp/emacs-lisp/loaddefs-gen.el
@@
-183,7
+183,9
@@
expression, in which case we want to handle forms differently."
(loaddefs-generate--shorten-autoload
`(autoload ,(nth 1 form) ,file ,doc ,interactive ,type))))
- ((and expansion (memq car '(progn prog1)))
+ ;; Look inside `progn', and `eval-and-compile', since these
+ ;; are often used in the expansion of things like `pcase-defmacro'.
+ ((and expansion (memq car '(progn prog1 eval-and-compile)))
(let ((end (memq :autoload-end form)))
(when end ;Cut-off anything after the :autoload-end marker.
(setq form (copy-sequence form))